﻿@model ShippingMethodModel

<div class="layui-col-md12">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-form" wid100 lay-filter="">
                <input asp-for="Id" type="hidden" />
                <div class="layui-form-item">
                    <u-label asp-for="Name" />
                    <div class="layui-input-inline">
                        <u-editor asp-for="Name" />
                        <span asp-validation-for="Name"></span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <u-label asp-for="Description" />
                    <div class="layui-input-inline">
                        <u-textarea asp-for="Description" style="width:320px;height:100px;" />
                        <span asp-validation-for="Description"></span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <u-label asp-for="DisplayOrder" />
                    <div class="layui-input-inline">
                        <u-editor asp-for="DisplayOrder" />
                        <span asp-validation-for="DisplayOrder"></span>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button id="set_system_submit_btn" style="display:none" class="layui-btn" lay-submit lay-filter="set_system_submit_btn">确认保存</button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>


<script>
    layui.use(['index'], function () {
        var $ = layui.$
            , form = layui.form
            ,active = {  }
        form.on('submit(set_system_submit_btn)', function (obj) {
          var field = obj.field; //获取提交的字段
            field.Description = ue.getContent();
            $.post('@Url.Action("EditMethod")', field, function (rep) {
                if (rep.success==1)
              layer.msg('保存成功');
            });
            return false;
    });
        $('.layui-btn.layuiadmin-btn-tags').on('click', function () {
            var type = $(this).data('type');
            active[type] ? active[type].call(this) : '';
        });
    });

</script>